<!--
 * @Author: your name
 * @Date: 2021-08-16 18:51:12
 * @LastEditTime: 2021-08-17 15:33:15
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \练习\9-erjilanmu.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>二级栏目</title>
    <style>
        html{
            font: 12px '微软雅黑';
        }
        body , ul{
            margin: 0;
            padding: 0;
        }
        ul{
            list-style: none;
        }
        .content{
            background-color: lightpink;
            height: 400px;
        }
        .header{
            position: relative;
        }
        .header ul.menu {
        background-color: lightseagreen;
        color: #fff;
        width: 1024px;
        margin: 0 auto ;
        }
        .header ul.menu::after{   /*浮动布局清除子元素对父元素的影响*/
            content: "";
            display: block;
            clear: both;
        }
        .header ul.menu > li.menu_item{
            float: left;
            line-height: 3em;
            text-align: center;
            width: 100px;
            cursor: pointer;
        }
        .header ul.menu > li.menu_item:hover > .sub_menu {
        display: block;
        }
        .header ul.menu .sub_menu {
        display: none;
        position: absolute; /*脱离文档流*/
        left: 0;
        height: 200px;
        width: 100%;
        background-color: #fff;
        }
    </style>
</head>
<body>
    <div class="header">
        <ul class="menu">
            <li class="menu_item">
                <span>首页</span>
                <div class="sub_menu"></div>
            </li>
            <li class="menu_item">
                <span>居家生活</span>
                <div class="sub_menu"></div>
            </li>
            <li class="menu_item">
                <span>服饰鞋包</span>
                <div class="sub_menu"></div>
            </li>
            <li class="menu_item">
                <span>美食酒水</span>
                <div class="sub_menu"></div>
            </li>
            <li class="menu_item">
                <span>个护清洁</span>
                <div class="sub_menu"></div>
            </li>
            <li class="menu_item">
                <span>母婴亲子</span>
                <div class="sub_menu"></div>
            </li>
            <li class="menu_item">
                <span>运动旅行</span>
                <div class="sub_menu"></div>
            </li>
            <li class="menu_item">
                <span>数码家电</span>
                <div class="sub_menu"></div>
            </li>
            <li class="menu_item">
                <span>严选全球</span>
                <div class="sub_menu"></div>
            </li>
            <li class="menu_item">
                <span>为你严选</span>
                <div class="sub_menu"></div>
            </li>
            <li class="menu_item">
                <span>众筹</span>
                <div class="sub_menu"></div>
            </li>
        </ul>
        <div class="content">

        </div>
    </div>
</body>
</html>